# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dbd
pkgver=61.8cf5350
pkgrel=1
groups=('blackarch' 'blackarch-misc')
pkgdesc='A Netcat-clone, designed to be portable and offer strong encryption. It runs on Unix-like operating systems and on Microsoft Win32.'
url='https://github.com/gitdurandal/dbd'
arch=('x86_64' 'aarch64')
license=('GPL3')
makedepends=('git')
source=("git+https://github.com/gitdurandal/$pkgname.git")
sha512sums=('SKIP')
options=('!strip')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make unix
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"

  cp -a --no-preserve=ownership * "$pkgdir/usr/share/$pkgname/"
}

